#!/usr/bin/env python

#a, b = 0, 1
#
#print 'The value of fibnacci is: '
#while b < 1000:
#    print '\n', b,
#    a, b = b, a + b

def fib(max_value):
    a, b = 1, 1

    while a < max_value:
        yield a
        a, b = b, a+b

for n in fib(1000):
    print n
